package entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.util.List;

/**
 * The type Product.
 */
public class Product extends Common implements Serializable {
    private static final long serialVersionUID = -64224856157160492L;
    @TableId(type = IdType.ID_WORKER_STR)
    private String id;



    /**
     * 商品名称
     */
    private String pname;
    /**
     * 商品进价
     */
    private Double purchase;
    /**
     * 商品销售价格
     */
    private Double price;
    /**
     * 商品图片
     */
    private String picture;
    /**
     * 供应商id
     */
    private String providerId;
    /**
     * 能发退货，1为能，0不能
     */
    private Integer returned;
    /**
     * 1级分类id
     */
    @TableField(value = "categoryLevel1Id")
    private String categoryLevel1Id;
    /**
     * 2级分类id
     */
    @TableField(value = "categoryLevel2Id")
    private String categoryLevel2Id;
    /**
     * 描述
     */
    private String description;
    /**
     * 单位
     */
    private String unit;
    /**
     * 货损率
     */
    @TableField(value = "damageRate")
    private Double damageRate;
    /**
     * 保质期
     */
    @TableField(value = "qualityDay")
    private Integer qualityDay;
    /**
     * 是否要加工 0不需要，1需要
     */
    private Integer machining;
    /**
     * 加工序号id
     */
    @TableField(value = "machiningId")
    private String machiningId;
    /**
     * 最大购买数
     */
    @TableField(value = "maxNum")
    private Integer maxNum;
    /**
     * 最小购买数
     */
    @TableField(value = "minNum")
    private Integer minNum;

    private Integer status;

    private List<Provider> providerList;

    private List<Category> categoryList;

    /**
     * To string string.
     *
     * @return the string
     */
    @Override
    public String toString() {
        return "Product{" +
                "id='" + id + '\'' +
                ", pname='" + pname + '\'' +
                ", purchase=" + purchase +
                ", price=" + price +
                ", picture='" + picture + '\'' +
                ", providerId='" + providerId + '\'' +
                ", returned=" + returned +
                ", categoryLevel1Id='" + categoryLevel1Id + '\'' +
                ", categoryLevel2Id='" + categoryLevel2Id + '\'' +
                ", description='" + description + '\'' +
                ", unit='" + unit + '\'' +
                ", damageRate=" + damageRate +
                ", qualityDay=" + qualityDay +
                ", machining=" + machining +
                ", machiningId='" + machiningId + '\'' +
                ", maxNum=" + maxNum +
                ", minNum=" + minNum +
                ", status=" + status +
                ", providerList=" + providerList +
                ", categoryList=" + categoryList +
                '}';
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public List<Provider> getProviderList() {
        return providerList;
    }

    public void setProviderList(List<Provider> providerList) {
        this.providerList = providerList;
    }

    public List<Category> getCategoryList() {
        return categoryList;
    }

    public void setCategoryList(List<Category> categoryList) {
        this.categoryList = categoryList;
    }

    /**
     * Gets id.
     *
     * @return the id
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public String getId() {
        return id;
    }

    /**
     * Sets id.
     *
     * @param id the id
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * Gets pname.
     *
     * @return the pname
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public String getPname() {
        return pname;
    }

    /**
     * Sets pname.
     *
     * @param pname the pname
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public void setPname(String pname) {
        this.pname = pname;
    }

    /**
     * Gets purchase.
     *
     * @return the purchase
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public Double getPurchase() {
        return purchase;
    }

    /**
     * Sets purchase.
     *
     * @param purchase the purchase
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public void setPurchase(Double purchase) {
        this.purchase = purchase;
    }

    /**
     * Gets price.
     *
     * @return the price
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public Double getPrice() {
        return price;
    }

    /**
     * Sets price.
     *
     * @param price the price
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public void setPrice(Double price) {
        this.price = price;
    }

    /**
     * Gets picture.
     *
     * @return the picture
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public String getPicture() {
        return picture;
    }

    /**
     * Sets picture.
     *
     * @param picture the picture
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public void setPicture(String picture) {
        this.picture = picture;
    }

    /**
     * Gets provider id.
     *
     * @return the provider id
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public String getProviderId() {
        return providerId;
    }

    /**
     * Sets provider id.
     *
     * @param providerId the provider id
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public void setProviderId(String providerId) {
        this.providerId = providerId;
    }

    /**
     * Gets returned.
     *
     * @return the returned
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public Integer getReturned() {
        return returned;
    }

    /**
     * Sets returned.
     *
     * @param returned the returned
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public void setReturned(Integer returned) {
        this.returned = returned;
    }

    /**
     * Gets category level 1 id.
     *
     * @return the category level 1 id
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public String getCategoryLevel1Id() {
        return categoryLevel1Id;
    }

    /**
     * Sets category level 1 id.
     *
     * @param categoryLevel1Id the category level 1 id
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public void setCategoryLevel1Id(String categoryLevel1Id) {
        this.categoryLevel1Id = categoryLevel1Id;
    }

    /**
     * Gets category level 2 id.
     *
     * @return the category level 2 id
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public String getCategoryLevel2Id() {
        return categoryLevel2Id;
    }

    /**
     * Sets category level 2 id.
     *
     * @param categoryLevel2Id the category level 2 id
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public void setCategoryLevel2Id(String categoryLevel2Id) {
        this.categoryLevel2Id = categoryLevel2Id;
    }

    /**
     * Gets description.
     *
     * @return the description
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public String getDescription() {
        return description;
    }

    /**
     * Sets description.
     *
     * @param description the description
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * Gets unit.
     *
     * @return the unit
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public String getUnit() {
        return unit;
    }

    /**
     * Sets unit.
     *
     * @param unit the unit
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public void setUnit(String unit) {
        this.unit = unit;
    }

    /**
     * Gets damage rate.
     *
     * @return the damage rate
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public Double getDamageRate() {
        return damageRate;
    }

    /**
     * Sets damage rate.
     *
     * @param damageRate the damage rate
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public void setDamageRate(Double damageRate) {
        this.damageRate = damageRate;
    }

    /**
     * Gets quality day.
     *
     * @return the quality day
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public Integer getQualityDay() {
        return qualityDay;
    }

    /**
     * Sets quality day.
     *
     * @param qualityDay the quality day
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public void setQualityDay(Integer qualityDay) {
        this.qualityDay = qualityDay;
    }

    /**
     * Gets machining.
     *
     * @return the machining
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public Integer getMachining() {
        return machining;
    }

    /**
     * Sets machining.
     *
     * @param machining the machining
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public void setMachining(Integer machining) {
        this.machining = machining;
    }

    /**
     * Gets machining id.
     *
     * @return the machining id
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public String getMachiningId() {
        return machiningId;
    }

    /**
     * Sets machining id.
     *
     * @param machiningId the machining id
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public void setMachiningId(String machiningId) {
        this.machiningId = machiningId;
    }

    /**
     * Gets max num.
     *
     * @return the max num
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public Integer getMaxNum() {
        return maxNum;
    }

    /**
     * Sets max num.
     *
     * @param maxNum the max num
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public void setMaxNum(Integer maxNum) {
        this.maxNum = maxNum;
    }

    /**
     * Gets min num.
     *
     * @return the min num
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public Integer getMinNum() {
        return minNum;
    }

    /**
     * Sets min num.
     *
     * @param minNum the min num
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public void setMinNum(Integer minNum) {
        this.minNum = minNum;
    }

    /**
     * Instantiates a new Product.
     *
     * @param id               the id
     * @param pname            the pname
     * @param purchase         the purchase
     * @param price            the price
     * @param picture          the picture
     * @param providerId       the provider id
     * @param returned         the returned
     * @param categoryLevel1Id the category level 1 id
     * @param categoryLevel2Id the category level 2 id
     * @param description      the description
     * @param unit             the unit
     * @param damageRate       the damage rate
     * @param qualityDay       the quality day
     * @param machining        the machining
     * @param machiningId      the machining id
     * @param maxNum           the max num
     * @param minNum           the min num
     * @author overlook
     * @date 2022 -04-16 20:31:21
     */
    public Product(String id, String pname, Double purchase, Double price, String picture, String providerId, Integer returned, String categoryLevel1Id, String categoryLevel2Id, String description, String unit, Double damageRate, Integer qualityDay, Integer machining, String machiningId, Integer maxNum, Integer minNum) {
        this.id = id;
        this.pname = pname;
        this.purchase = purchase;
        this.price = price;
        this.picture = picture;
        this.providerId = providerId;
        this.returned = returned;
        this.categoryLevel1Id = categoryLevel1Id;
        this.categoryLevel2Id = categoryLevel2Id;
        this.description = description;
        this.unit = unit;
        this.damageRate = damageRate;
        this.qualityDay = qualityDay;
        this.machining = machining;
        this.machiningId = machiningId;
        this.maxNum = maxNum;
        this.minNum = minNum;
    }

    /**
     * Instantiates a new Product.
     *
     * @author overlook
     * @date 2022 -04-16 20:31:22
     */
    public Product() {
    }
}

